public class GRGV {
    public static void main(String[] args) {
        // 定义基类 Vehicle
        abstract class Vehicle {
            String make;
            String model;
            public Vehicle(String make, String model) {
                this.make = make;
                this.model = model;
            }

            public abstract void drive();
        }
        class Car extends Vehicle {
            public Car(String make, String model) {
                super(make, model);
            }

            public void drive() {
                System.out.println("Driving a " + make + " " + model + " car.");
            }
        }
        class Bike extends Vehicle {
            public Bike(String make, String model) {
                super(make, model);
            }

            public void drive() {
                System.out.println("Driving a " + make + " " + model + " Bike.");
            }
        }

                Vehicle[] vehicles = new Vehicle[4];
                vehicles[0] = new Car("Toyota", "Corolla");
                vehicles[1] = new Bike("Yamaha", "MT-09");
                vehicles[2] = new Car("Ford", "Mustang");
                vehicles[3] = new Bike("Harley", "Street 750");
                for (Vehicle vehicle : vehicles) {
                    vehicle.drive();
                }
            }
        }



